#ifndef TCPSERVER_HPP
#define TCPSERVER_HPP

#include <QTcpServer>
#include "DataBaseAccessor.hpp"


template <class Key, class T> class QMap;
class QTcpSocket;
class TcpSocket;
class Client;

typedef QMap<int, Client*> ClientMap;

class TcpServer : public QTcpServer
{
    Q_OBJECT
public:
    explicit TcpServer(QObject *parent = 0);

protected:
    void incomingConnection(int handle);

private:
    ClientMap  m_clients;

signals:

public slots:

private slots:
    void onDisconnected();
    
};

#endif // TCPSERVER_HPP
